package com.example.bankend.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * @author luolinila
 * @date 2025/6/16 19:58
 */
@TableName("tradeinfo")
@NoArgsConstructor
@Data
public class Trade {
    private Integer tradeID;
    private Timestamp tradeDate;
    private String tradeType;
    private BigDecimal tradeMoney;
    private String remark;
    private String cardID;
    private String isDelete;


    public Trade(String newTradeType, BigDecimal newTradeMoney, String newRemark, String newCardID) {
        this.tradeDate = new Timestamp(System.currentTimeMillis());
        this.tradeType = newTradeType;
        this.tradeMoney = newTradeMoney;
        this.remark = newRemark;
        this.cardID = newCardID;
        this.isDelete = "0";
    }
}
